package com.lebang.model.enums;

/**
 * 布尔值
 * @className SessionStatus
 * @author weizx  
 * @date 2018年6月27日 上午11:52:25
 */
public enum SdkVideoEnums {
	/**
	 *
	 */
	WANGMAI("旺麦视频", 0,"wangmai"),
	BAIDU("百度视频", 1,"baidu"),
	CSJ("csj视频", 6,"baidu"),
	SIGMOB("sigmob", 5,"sigmob"),
	//广点通
	GDT("广点通", 4,"guandiantong"),
	KUAISHOU("快手视频", 8,"kuaishou"),
	LZ_YD("粒子移动视频", 9,"kuaishou"),;

	private String title;
	private int index;
	private String id;

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public int getIndex() {
		return index;
	}

	public void setIndex(int index) {
		this.index = index;
	}

	private SdkVideoEnums(String title, int index,String id) {
		this.title = title;
		this.index = index;
		this.id=id;
	}
	
	public static  SdkVideoEnums getByIndex(int index) {
		for (SdkVideoEnums e : SdkVideoEnums.values()) {
			if (e.index == index) {
				return e;
			}
		}
		return null;
	}
	
	public SdkVideoEnums getByTitle(String title) {
		if (null == title) {
			return null;
		}
		for (SdkVideoEnums e : SdkVideoEnums.values()) {
			if (e.title.equals(title)) {
				return e;
			}
		}
		return null;
	}
}
